<template>
  <div>
    <el-form :model="itemInfo" :inline="true" size="small" label-width="150px">
      <el-form-item label="供应商号:">
        <div style="width: 200px;">
          <span v-if="itemInfo.mpsFormInfo" class="filter-item">{{ itemInfo.mpsFormInfo.vendorNbr }}</span>
        </div>
      </el-form-item>
      <el-form-item label="供应商邮箱地址:">
        <el-input v-if="itemInfo.mpsFormInfo" v-model="itemInfo.mpsFormInfo.vendorEmail" size="mini" style="width: 200px;" class="filter-item" />
      </el-form-item>
      <el-form-item label="供应商附件:">
        <el-tooltip v-if="itemInfo.filePath" content="点击查看/下载" effect="dark" placement="bottom">
          <i class="el-icon-files" style="font-size:23px;margin-right: 3px;" @click="previewFile(itemInfo.filePath)" />
        </el-tooltip>
      </el-form-item>
      <el-form-item label="采购附件:">
        <el-tooltip v-if="itemInfo.buyerFilePath" content="点击查看/下载" effect="dark" placement="bottom">
          <i class="el-icon-files" style="font-size:23px;margin-right: 3px;" @click="previewFile(itemInfo.buyerFilePath)" />
        </el-tooltip>
      </el-form-item>
    </el-form>
    <el-collapse>
      <el-collapse-item title="供应商提交数据" name="1">
        <el-form :model="vendorItemInfo" :inline="true" size="small" label-position="right" label-width="200px">
          <el-form-item label="条码:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.upcNbr }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商号:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vendorNbr }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商名称:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vendorName }}</span>
            </div>
          </el-form-item>
          <el-form-item label="商品说明1:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.item1Desc }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商之商品代码:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vendorStockId }}</span>
            </div>
          </el-form-item>
          <el-form-item label="货架1/颜色:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.shlflbl1ColrDesc }}</span>
            </div>
          </el-form-item>
          <el-form-item label="规格型号:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.shlflbl3SizeDesc }}</span>
            </div>
          </el-form-item>
          <el-form-item label="原包高度:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vnpkHeightQty }}</span>
            </div>
          </el-form-item>
          <el-form-item label="原包宽度:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vnpkWidthQty }}</span>
            </div>
          </el-form-item>
          <el-form-item label="原包深度:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vnpkLengthQty }}</span>
            </div>
          </el-form-item>
          <el-form-item label="原包重量:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vnpkWeightQty }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商箱包数量:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vnpkQty }}</span>
            </div>
          </el-form-item>
          <el-form-item label="仓包内装量:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.whpkQty }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商包装成本:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vnpkCostAmt }}</span>
            </div>
          </el-form-item>
          <el-form-item label="进项税:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vatIn }}</span>
            </div>
          </el-form-item>
          <el-form-item label="产地:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.mdsDesc }}</span>
            </div>
          </el-form-item>
          <el-form-item label="部门:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.deptNbr }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商联系人:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vendorPerson }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商电话:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vendorTel }}</span>
            </div>
          </el-form-item>
          <el-form-item label="供应商邮箱:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.vendorEmail }}</span>
            </div>
          </el-form-item>
          <el-form-item label="促销成本价:">
            <div style="width: 200px;">
              <span class="filter-item">{{ vendorItemInfo.promoterCostPrice }}</span>
            </div>
          </el-form-item>
          <el-form-item label="促销价开始日期:">
            <div style="width: 200px;">
              <span class="filter-item">{{ parseTime(vendorItemInfo.promoterPriceStartDate) }}</span>
            </div>
          </el-form-item>
          <el-form-item label="促销价结束日期:">
            <div style="width: 200px;">
              <span class="filter-item">{{ parseTime(vendorItemInfo.promoterPriceEndDate) }}</span>
            </div>
          </el-form-item>
        </el-form>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
import { previewFile } from '@/utils/item'
import { parseTime } from '@/utils/index'

export default {
  data() {
    return {
      vendorItemInfo: {},
      itemInfo: {}
    }
  },
  methods: {
    parseTime,
    previewFile
  }
}
</script>
